home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.2 KB | 38 lines | [TEXT/GEOL] |
- Item 4605966 23-Jan-91 00:12PST
-
- From: D4682 Marx, Peter,PRT
-
- To: CPLUS.DEV$ C++ Interest List--Developers
- CPLUS.APPLE$ C++ Interest List--Apple Employees
-
- cc: TOM.CHAVEZ Chavez, Thomas
-
- Item forwarded by BEISEL to WANG2
-
- Item forwarded by PERRY.G to CATHERS
- PHIL.TH
-
- ------------------------------------------------------------------------------
-
- Sub: const vs #define in CFront
-
- Dear Folks:
-
- This is just an observation that may be useful to someone writing large C++
- programs. After repeatedly running out of memory in CFront using dump/load, I
- decided to try a little experiment.
-
- I replaced most of the "const short int" and "const IDType" declarations with
- simple "#define" statements. The memory and disk space saved was phenomenal. I
- haven't looked at the intermediate code coming out of CFront, but I must say
- that this has turned out to be a very useful "feature."
-
- Perhaps someone could fill me in on why this works so well?
-
- Sincerely,
-
-
- Peter Marx
- UCLA Dept. of Medicine
-
-